home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Applications 2002 November / SGI IRIX 6.5 Applications 2002 November.iso / dist / gateway.idb / usr / WebFace / Tasks / security-third.cgi.z / security-third.cgi
Encoding:
Text File  |  2002-06-12  |  4.7 KB  |  146 lines

  1. #!/usr/bin/perl5
  2. #
  3. # security-third.cgi
  4. #
  5. # Copyright 1988-1996 Silicon Graphics, Inc.
  6. # All rights reserved.
  7. #
  8. # This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  9. # the contents of this file may not be disclosed to third parties, copied or
  10. # duplicated in any form, in whole or in part, without the prior written
  11. # permission of Silicon Graphics, Inc.
  12. #
  13. # RESTRICTED RIGHTS LEGEND:
  14. # Use, duplication or disclosure by the Government is subject to restrictions
  15. # as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  16. # and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  17. # successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  18. # rights reserved under the Copyright Laws of the United States.
  19. #
  20. # $Id: security-third.cgi,v 1.8 1998/02/11 23:23:45 jrw Exp $
  21.  
  22. require "/usr/OnRamp/lib/OnRamp.pm";
  23.  
  24. if (!$ARGV[0]) { printf("Location: %s%c%c","/tasks/Tasks.security-start.cgi",10,10); exit; }
  25.  
  26. $temp = "task.tmp3";
  27. $action = "security-third.cgi?loop";
  28. $go = "/tasks/security-fourth.cgi?t";
  29.  
  30. $it = "<td><font size=5><i>";
  31. $ni = "</i></font></td>";
  32.  
  33. &get_fields;
  34.  
  35. if ($ARGV[0] eq loop) {
  36.         &writeFile;
  37.  
  38.         # printf("Location: %s%c%c",$go,10,10);
  39.         print "Content-type: text/html\n\n";
  40.         print "<HTML><HEAD>";
  41.         print "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0; URL=$go\">";
  42.         print "</HEAD><BODY></BODY></HTML>";
  43.         exit 0;
  44. }
  45.  
  46. &generic;
  47.  
  48. sub writeFile {
  49.     open(OUT, "> $temp");
  50.  
  51.     if ($fld{'rlogin'}) { print OUT "rlogin:yes\n"; }
  52.     else { print OUT "rlogin:no\n"; }
  53.  
  54.     if ($fld{'xhost'}) { print OUT "xhost:yes\n"; }       
  55.         else { print OUT "xhost:no\n"; }       
  56.     
  57.         close(OUT);
  58. }
  59.  
  60. sub generic {
  61.     print "Content-type: text/html\n\n";
  62.     print "<html><title>Security Setup (continued)</title>\n";
  63.  
  64.     print "<script language=\"JavaScript\">\n<!--\n";
  65.  
  66.     # JavaScript
  67. print "function Next()  {
  68.     form = document.page3;
  69.     setTimeout('form.submit()',0);
  70.     return;
  71. }
  72. function Previous()  {
  73.     setTimeout('window.location=\"/tasks/security-second.cgi?t\"',0);
  74.     return;
  75. }
  76. ";
  77.  
  78.     print "//-->\n";
  79.     print "</script></head>\n\n";
  80.  
  81.     print "<body bgcolor=\'a7b4ce\' background=/tasks/security-task.bg.gif>\n";
  82.  
  83.     print "<table width=100%>",
  84.           "<tr><th align=left><h1>Security Setup (continued)</h1></th>\n",
  85.           "<th align=right><a href=\"/newsplash.shtml\">",
  86.           "<img height=55 width=57 border=0 src=/tasks/home.gif></a>\n",
  87.           "  <a href=\"Tasks.shtml\">",
  88.           "<img height=55 width=57 border=0 src=/tasks/back.gif></a>",
  89.           "</tr></table>\n";
  90.  
  91.     printf("\n<form name=\"page3\" action=\"%s\" method=post>\n", $action);
  92.     
  93.     print "<center><table width=620>\n";
  94.  
  95.     print "<tr>$it Remote login: <br>$ni</tr>\n";
  96.     print "<tr><td>
  97.         Ordinarily, individual users on a UNIX system can configure their 
  98.         own accounts to allow other designated users to log in to the 
  99.         accounts without a login verification process. UNIX system
  100.         administrators can configure the entire system to enable unverified 
  101.         logins. However, these login configurations create a security risk to 
  102.         the Internet Gateway server. 
  103.  
  104.         The ability to access the Internet Gateway's X server from a remote 
  105.         location is also a security risk, since tampering with the X server 
  106.         can compromise window management services, which are critical
  107.         to proper system functioning.",
  108.         
  109.         "</td></tr></table>\n\n";
  110.  
  111.     print "<table width=620>\n";
  112.     print "<tr><td> 
  113.          Select the security protection items below to enable or disable
  114.          them. A red check mark indicates that protection is enabled.",
  115.          "</td></tr></table>\n\n"; 
  116.     
  117.     print "<table width=320>\n";
  118.  
  119.     print "<tr><td align=center><input type=checkbox name=rlogin ",
  120.           "value=1></td><td colspan=2><strong>Require password verification for all remote logins</strong></td>",
  121.           "</tr>\n"; 
  122.  
  123.     print "<tr><td align=center><input type=checkbox name=xhost ",
  124.           "value=1></td><td colspan=2><strong>Restrict access of X server</strong></td>",
  125.           "</tr>\n"; 
  126.  
  127.     print "</table></center>\n\n";
  128.  
  129.    print '<MAP NAME="js_map1">',
  130.     '    <AREA SHAPE="rect" COORDS="0,0,59,52" HREF="javascript:Previous()"
  131.     onMouseOver="window.status=\'\';return true">',
  132.     '</MAP>';
  133.     print "\n";
  134.     print '<MAP NAME="js_map2">',
  135.     '    <AREA SHAPE="rect" COORDS="0,0,59,52" HREF="javascript:Next()"
  136.     onMouseOver="window.status=\'\';return true">',
  137.     '</MAP>';
  138.     print "\n";
  139.     print '<IMG SRC="/tasks/rightarrow.gif" BORDER=0 USEMAP="#js_map2" align="right">';
  140.     print "\n";
  141.     print '<IMG SRC="/tasks/leftarrow.gif" BORDER=0 USEMAP="#js_map1" align="right">';
  142.  
  143.     print "\n</form></body></html>";
  144. }
  145.  
  146.